import os

def list_mp4_files(directory, output_file):
    with open(output_file, 'w', encoding='utf-8') as file:
        for root, dirs, files in os.walk(directory):
            for name in files:
                if name.lower().endswith('.mp4'):
                    file.write(os.path.join(root, name) + '\n')

# 使用示例
directory = r'G:/vlog/'
output_file = r'G:/vlog.txt'
list_mp4_files(directory, output_file)
